import { createStore, Store, useStore as useVuxStore } from "vuex"
import { createPinia } from "pinia"
import { IRootState, IStoreType } from "./types"
import todolist from "./todolist"

const store = createStore<IRootState>({
  state(){
    return {}
  },
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    todolist
  }
})

export function useStore(): Store<IStoreType>{
  return useVuxStore()
}


export const piniaStore = createPinia()

export default store
